module.exports = {
  nav_name: '管理员设置', //生成导航菜单
  module_name: 'admin_manager',  //生成路径，与模块名相同
  api: `{
    page: commonPath + "/admin/user/pageSearch", // 会员分页
    changeState: commonPath + '/admin/user/modifyState', //会员状态编辑
    detail: commonPath + '/admin/user/get', //获取详情,
    add: commonPath + '/admin/user/add', //添加页面
  }`,
  table: {
    nav_name: "管理员列表",
    tipsText: "管理员设置 >> 管理员列表",
    //获取列表页面
    tableData: [
      { title: '序号', name: 'index', type: "normal" },
      { title: '账户名', name: 'temp', type: "normal", showObj: "{}" },
      { title: '姓名', name: 'temp', type: "normal", showObj: "{}" },
      { title: '身份', name: 'temp', type: "normal", showObj: "{}" },
      { title: '昵称', name: 'temp', type: "normal", showObj: "{}" },
    ],
    tableOpt: [
      // {
      //   type: "view",
      //   text: "查看",
      //   request: false,
      //   jump: "/member_manager/see_detail_member查看"
      // },
      {
        type: "modify",
        text: "编辑",
        request: false,
        jump: "/admin_manager_add_page"
      },
      // {
      //   type: "changeState",
      //   text: "加入黑名单",
      //   request: true,
      //   url: "API.member_manager.changeState",
      //   requestType: 'post',
      //   params: `{id,  state: 2 }`, //必须为文本
      //   methodNameTag: 'Black', //方法衔接拓展名
      // },
      {
        type: "del",
        text: "删除",
        request: true,
        url: "/api/member_change",
        requestType: 'post',
      },
      // {
      //   type: "changeState",
      //   text: "启用",
      //   request: true,
      //   url: "/api/member_change",
      //   requestType: 'post',
      //   params: `{ state: 1 }`,
      //   methodNameTag: 'Enable', //方法衔接拓展名 用于标志不同方法
      // },
    ],
    search: {
      contentArr: {
        input1: { labelName: '账号名', inputName: 'acount' },
        input2: { labelName: '姓名', inputName: 'realName' },
      },
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      addBtn: {
        //搜索栏具有添加功能按钮时，设置此字段
        type: "add",
        text: "新增",
        request: false,
        jump: "/admin_manager_add_page", //后期设置成自动的
      }
    },
  },


  //添加页面
  add_page: {
    tipsText: "会员管理 >> 添加",
    formData: {
      titleText: "请填写管理员相关信息",
      //三种类型，输入，下拉，图片上传
      input1: {
        labelName: '账号名',
        inputName: 'tel', 
        isNeed: 'true',
      },
      input2: {
        labelName: '密码',
        inputName: 'realName', 
        isNeed: 'true'
      },
      textarea1: {
        labelName: '课程简介',
        inputName: 'synopsis',
        isNeed: 'true',
        rows: "5",
        width: "360", //自动补全px
        isNeed: 'true',
      },
      // select1: {
      //   labelName: '性别',
      //   inputName: 'sex',  //输入绑定的变量
      //   selectOptsName: "sexOpts",
      //   selectOptsArr: `[
      //       { value: "M", label: "男" },
      //       { value: "F", label: "女" },
      //       { value: "", label: "全部"},
      //     ],
      //     `, //选项数组
      // },
      // //图片上传
      // uploadImg1: {
      //   labelName: "轮播图上传",
      //   inputName: "img",
      // },
      // //三级联动组件
      // address1: {
      //   label: "地址选择",
      //   inputName: "",
      // },
         //图片上传
         uploadImg1: {
          labelName: "企业logo图",
          inputName: "companyLogo",
          type: "many", //type: "single"
          countLimit: "1",
          uploadMethod: "handleUploadLogo",
          isNeed: 'true',
        },
        //富文本组件 富文本组件添加默认背景
        richText1: {
          labelName: '企业详情',
          inputName: 'companyRemark',
          minHeight: "180", //高度
          uploadApi: "API.common.upload",
          editContentChangeMethodName: "handleBgEditChange", //改变方法
          isNeed: 'true',
        },
      


    },
    addBtn: {
      text: '立即添加',
      url: "API.admin_manager.add"
    }, //
    editBtn: {
      text: '编辑',
      detailUrl: "API.admin_manager.detail",
      detailType: 'get',
      detailParams: {},  //这里是对象,非字符串, 只能写给定值的参数
      editUrl: "API.admin_manager.edit",
      jump: '/admin_manager_page'
    },
    cancelBtn: { text: "取消" }, //
  },

  // //详情页面
  // detail_page: {

  // }
}
